import AppSettings from "@runtime/base/AppSettings";
import { ClientMessage } from "@runtime/generate/message/ClientMessage";
import WebSocketComponent from "@runtime/module/WebSocket/WebSocketComponent";
import AssetLoaderComponent from "@runtime/UnityEngineBridge/AssetLoaderComponent";
import { Ref, ref, WatchStopHandle } from "@vue/runtime-dom";
import { message } from 'ant-design-vue';
import MessageCode from "./MessageCode";
import OrbitCameraComponent from "./OrbitCameraComponent";

/**
 * 起始页
 */
export default class HomeContent {
    private static instance: HomeContent = new HomeContent();
    /**
     * 起始页
     */
    public static get Default(): HomeContent {
        return this.instance;
    }

    constructor() {
        window.addEventListener('unload', this.Dispose.bind(this));
    }

    Dispose() {
        window.removeEventListener('unload', this.Dispose);

        for (const watchStopHandle of this.watchStopHandles) {
            watchStopHandle();
        }
        this.watchStopHandles.clear();
    }


    public api :string = 'http://192.168.2.73:8081';
    public TOKEN:string = '';
    private watchStopHandles: Array<WatchStopHandle> = [];

 
}